export default (layer: any) => {
  const { positions, configJson } = layer;
  const json = JSON.parse(configJson);
  const position = positions?.flat();

  return {
    data: {
      position,
      type: 'particle',
      json,
    },
  };
};
